Ext.define('AmpleHarvest.objects.forms.gsFileSearch',
{
	extend				: 'Ext.form.Panel',
	alias				: 'widget.ampleharvest-objects-forms-gsfilesearch',
	source_name			: 'GS APPLICATION',
	stateful			: false,
	height				: 600,
	requires			:
	[
			'Ext.form.field.Number', 
			'Ext.form.field.Text',
			'Ext.form.FieldSet', 
			'Ext.form.field.Date',
			'AmpleHarvest.elements.combobox.cFacet'
	],

	statics				:
	{
		C_STR_FIELD_SOURCE		: "source"
	},
	
	uniqueKey		: (((1+Math.random())*0x10000)|0).toString(16).substring(1),
	
	listeners       :
    {
        setValueField : function(str_term)
        {
        	console.log(str_term);
        	Ext.getCmp('valuefield'+this.uniqueKey).searchTerm = str_term;;
        	Ext.getCmp('valuefield'+this.uniqueKey).setDisabled(false);
        }
    },
    
	initComponent			: function()
	{
		console.log(this.str_unique_id);
		this.m_obj_searchArea = Ext.create('Ext.form.field.Text',
				{
					fieldLabel	: "General",
					id			: 'ampleHarvest-objects-forms-textarea'+this.str_unique_id,
					name		: "general",
					hiddenName	: "general",
					inputType	: "textfield",
					allowBlank	: true,
					anchor		: "100%"
		});
		
		
		this.items =
		[
				this.m_obj_searchArea
		];
		this.callParent();
	}
}

);